import {
  get,
  post,
} from './http'
//工作分类接口
export const getWorkKindList = param => get('work-kind/listPage',param);  //查询工作分类
export const createWorkKind = param => post('work-kind/set',param);  //新增工作分类
export const deleteWorkKind = param => post('work-kind/del',param);  //删除工作分类
export const updateWorkKind = param => post('work-kind/edit',param);  //更新工作分类
//群组分类接口
export const getGroupKindList = param => get('groupType/getGroupTypeList',param); //获取群组名称信息
export const createGroupKind = param => post('groupType/createGroupType',param);  //创建群组名称信息
export const deleteGroupKind = param => post('groupType/deleteGroupType',param);  //删除群组名称信息
export const updateGroupKind = param => post('groupType/updateGroupType',param);  //更新群组名称信息
export const getGroupKindTree = param => get('groupType/getGroupType',param);  //根据群组类型获取对应的群组树结构
//项目管理接口
export const getProjectList = param => get('project/listPage',param); //获取
export const createProject = param => post('project/set',param);  //新增项目
export const deleteProject = param => post('project/del',param); //删除项目
export const updateProject = param => post('project/edit',param); //更新项目
export const getProjectTypeList = param => get('project-type/listPage',param);  //获取项目类型列表
export const createProjectKind = param => post('project-type/set',param); //新增项目类型
//任务管理接口
export const getWorkTaskList = param => get('work-task/getWorkTaskList',param); //获取任务列表
export const createWorkTask = param => post('work-task/set',param); //创建任务
export const deleteWorkTask = param => post('work-task/del',param); //删除任务
export const updateWorkTask = param => post('work-task/edit',param);  //编辑任务
//用户接口
export const getUserList = param => get('user-info/getUserList',param); //获取用户列表
export const getHavePowerUserList = param => get('user-info/getHavePowerUserList',param); //获取有审批权限的人
//工时填报接口
export const getWorkList = param => get('work/search',param); //获取工时填报表
export const addWrok = param => post('work/addWork',param); //填报工时
export const deleteWork = param => post('work/deleteWork',param); //删除工时表
export const updateWork = param => post('work/updateWork',param); //更新工时表
export const getWorkSetting = param => get('workSetting/getWorkSetList',param); //获取报工设置列表
export const createWorkSet = param => post('workSetting/createWorkSet',param);  //添加报工设置
export const deleteWorkSet = param => post('workSetting/deleteWorkSet',param);  //删除报工设置
export const updateWorkSet = param => post('workSetting/updateWorkSet',param);  //更新报工设置
//消息接口
export const getNormalUserMessage = param => get('work/listPageByUserIdAndMakeStatus',param); //查询用户填报状态
export const getPowerUserMessage = param => get('work/listPageByMakeUserIdAndMakeStatus',param); //查询审批人审核状态
//群组信息
export const getGroupList = param => get('workGroup/getGroupList',param);  //创建群组
export const createGroup = param => post('workGroup/createGroup',param); //创建群组
export const deleteGroup = param => post('workGroup/deleteGroup',param);  //删除群组
export const updateGroup = param => post('workGroup/updateGroup',param);  //更新群组
export const getUserByGroup = param => get('workGroup/getUserByGroup',param); //根据群组ID获取该群组下的用户
export const getPowerUserByGroup = param => get('workGroup/getPowerUserByGroup',param); //根据群组ID获取该群组下的审批人列表
export const getGroupPowerByUserId = param => get('workGroup/getGroupPowerByUserId',param); //根据用户ID获取用户群组中
export const listPageByCondition = param => get('work/listPageByCondition',param);  //根据条件查询工时表
//统计接口
export const staByProject = param => get('work/countGroupByProjectAndUserId',param);  //根据项目统计
export const staByUsername = param => get('work/countGroupByUserId',param); //根据任务人统计
export const staByMakeUser = param => get('work/countGroupByMakeUserId',param); //根据审批人统计
export const staByWorkKind = param => get('work/countGroupByWorkKindId',param); //根据任务类型统计
export const staByGroupType = param => get('work/countGroupByGroupType',param); //根据群组类型统计
export const staByTask = param => get('work/countGroupByWorkTask',param); //根据任务统计
//初始化权限接口
export const initUserPower = param => get('user-info/getInitPowerUserList',param);
//获取个人信息接口
export const getUserInfo = param => get('user-info/getUserInfo', param);


